gtkwidget: Cancel all gestures in other groups
authorCarlos Garnacho <carlosg@gnome.org>
Fri, 19 Jun 2020 16:50:51 +0000 (18:50 +0200)
committerCarlos Garnacho <carlosg@gnome.org>
Tue, 23 Jun 2020 21:42:53 +0000 (23:42 +0200)
When a gesture (group) claims a sequence, all other gesture groups
in the same widget should get cancelled. Not just previously claimed
ones, that shouldn't happen actually.

gtk/gtkwidget.c

index 61ae38f0b5e8b45658b71046844eb608d1e27232..8cb6a6c2f306041a5335fbc62e44d730d4f14dbf 100644 (file)
@@ -2178,8 +2178,7 @@ _gtk_widget_set_sequence_state_internal (GtkWidget             *widget,
           /* If a group is provided, ensure only gestures pertaining to the group
            * get a "claimed" state, all other claiming gestures must deny the sequence.
            */
-          if (gesture_state == GTK_EVENT_SEQUENCE_CLAIMED &&
-              gtk_gesture_get_sequence_state (gesture, sequence) == GTK_EVENT_SEQUENCE_CLAIMED)
+          if (state == GTK_EVENT_SEQUENCE_CLAIMED)
             gesture_state = GTK_EVENT_SEQUENCE_DENIED;
           else
             continue;